package com.outlook.flowervow;

import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;

public class EventPlayerJoin implements Listener {
    @EventHandler
    public void onJoin(PlayerJoinEvent e){
        Player p = e.getPlayer();
        ItemStack gui = new ItemStack(Material.COMPASS,1);
        ItemMeta guim = gui.getItemMeta();
        guim.setDisplayName(ChatColor.GREEN+"菜单");
        gui.setItemMeta(guim);
        p.getInventory().setItem(0,gui);
    }
}
